
public class Numbers {

	
	
	public static String[] GetStringArray(int length,int x)
	{
		String[] numbers=new String[length];
		for (int i=0;i<numbers.length;i++)
		{
			numbers[i]=Integer.toString((new java.util.Random()).nextInt(x));
			
		}
		
		return numbers;
	}
	
	public static void PrintStringArray(String[] arr)
	{
				for (int i=0;i<arr.length;i++)
		{
			System.out.print(arr[i]+" ");
			
			
		}
		
				System.out.println();
	}
	
	
	public static int SumArray(String[] arr)
	{
		int sum=0;
		for (int i=0;i<arr.length;i++)
		{
			sum += Integer.parseInt(arr[i]);
			
		}
		
		return sum;
	}
	
	
	public static void main(String[] args) {
		
		String[] NumberArray= Numbers.GetStringArray(10, 77);
		PrintStringArray(NumberArray);
		System.out.println("Sum of array elements:"+SumArray(NumberArray));
		
	}

}
